package database;

import java.sql.Connection;
import java.sql.SQLException;

import database.dao.MidTradePackageInfoDao;
import manager.pay.type.GetMidTradePackageInfo;
import util.JdbcUtils;
import util.MyFactory;

public class GetMidTradePackageDBServer {

	public GetMidTradePackageInfo selectMidTradePackageByPacketId(int tradeid ) throws SQLException{
		Connection conn = null;
		try{
			conn = MyFactory.context.getBean("JdbcUtils",JdbcUtils.class).getConnection();
			return MyFactory.context.getBean("MidTradePackageInfoDao", MidTradePackageInfoDao.class).selectMidTradePackageByPacketId(tradeid, conn);
		}finally{
			MyFactory.context.getBean("JdbcUtils",JdbcUtils.class).releaseConnection(conn);
		}
	}
}
